<%@page import="com.wframe.framework.util.UploadUtil" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w" %>
<%
    String path = request.getContextPath();
//    request.setAttribute("fileserver", UploadUtil.getConfig().getDownserver());
%>

<style>
    .ui-formContent select {
        height: 20px;
        font-size: 14px;
    }
    .ui-pagination .page_input input{
        height:18px;
        line-height:18px;
    }
    .ui_td td{
        background:#ffffff;
        color:#797979;
        height:25px;
        font-size:14px;
        border-bottom:1px solid #EEEEEE;
        padding-left:3px;
        cursor: pointer;
    }
</style>

<!-- 查询区域 -->
<form id="dataForm" action="/marketing/SinglePromotionPage@chooseProductList.page" method="post">
        <w:hidden bind="bean.id" />
        <w:hidden bind="bean.pname"/>
        <w:hidden bind="bean.code"/>
        <w:hidden bind="bean.classid"/>
        <div class="ui_line" style="margin-top:10px"></div>
        <w:hidden bind="pageSize_" value="10"/>
        <w:hidden bind="pageNum" value="1"/>
        <!-- 数据列表区域 -->
        <div id="seetab" style="border: 1px solid #DDDDDD;">
        <table class="ui-table" width="100%"  cellpadding="1" cellspacing="1" data-options="showPage:true,
																							pageNum:<w:write bind="pageNum" />,
																							pageSize:<w:write bind="10"/>,
																							total:<w:write bind="pagination.totalCount"/>,form:'dataForm'">
            <thead>
            <tr class="ui_th">
                <td width="40">商品编码</td>
                <td width="100">商品名称</td>
                <td width="40">原价</td>
                <td width="160">生产厂家</td>
                <td width="160">规格</td>
                <td width="160">商品分类</td>
                <td width="80">库存</td>
                <td width="80">促销类型</td>
                <td width="80">操作</td>
            </tr>
            </thead>
            <tbody id="prolist">
            <w:iterate id="info" bind="resultList_">
                <tr class="ui_td" >
                    <input type="hidden" name="showlistname" value="<w:write bind="#info.pname"/>">
                    <input type="hidden" name="showlistid" value="<w:write bind="#info.id"/>">
                    <input type="hidden" name="showlistcode" value="<w:write bind="#info.code"/>">
                    <input type="hidden" name="price" value="<w:write bind="#info.price"/>">
                    <input type="hidden" name="showlistB_chanjia" value="<w:write bind="#info.B_chanjia"/>">
                    <input type="hidden" name="showlistB_guige" value="<w:write bind="#info.B_guige"/>">
                    <input type="hidden" name="showlistclassname" value="<w:write bind="#info.classname"/>">
                    <input type="hidden" name="showlistproductamount" value="<w:write bind="#info.productamount"/>">
                    <input type="hidden" name="showlisttypes" value="<w:write bind="#info.moneyofftype"/>">
                    <input type="hidden" name="productSingle" value="<w:write bind="#productSingle"/>">
                    <td><w:write bind="#info.code"/></td>
                    <td><w:write bind="#info.pname"/></td>
                    <td><w:write bind="#info.price"/></td>
                    <td><w:write bind="#info.B_chanjia"/></td>
                    <td><w:write bind="#info.B_guige"/></td>
                    <td><w:write bind="#info.classname"/></td>
                    <w:define id="info_productamount" bind="#info.productamount" ></w:define>
                    <w:define id="info_products_types" bind="#info.products_types" ></w:define>
                    <w:switch>
                        <w:case bind="#info_productamount <100" >
                            <td style="color: red"><w:write bind="#info.productamount"/></td>
                        </w:case>
                        <w:case bind="#info_productamount >= 100">
                            <td><w:write bind="#info.productamount"/></td>
                        </w:case>
                    </w:switch>
                    <%--<td><w:write bind="#info.productamount"/></td>--%>
                    <td><w:write bind="#info.moneyOffType"/></td>
                    <w:define id="info_moneyOffType" bind="#info.moneyOffType"></w:define>
                    <td align="center">
                        <w:switch>
                            <w:case bind="#info_moneyOffType.indexOf('单品促销') >= 0">
                                <input type="radio" name="primaryKey" disabled="disabled">
                            </w:case>
                            <w:else>
                                <input type="radio" name="primaryKey" onclick="inp(this)" value="<w:write bind="#info.id"/>">
                            </w:else>
                        </w:switch>

                    </td>
                </tr>
            </w:iterate>


            </tbody>
        </table>
    </div>

    <div id="seestab" style="border: 1px solid #DDDDDD;display: none;">
        <table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
            <thead>
            <tr class="ui_th">
                <td width="40">商品编码</td>
                <td width="100">商品名称</td>
                <td width="40">原价</td>
                <td width="160">生产厂家</td>
                <td width="160">规格</td>
                <td width="160">商品分类</td>
                <td width="80">库存</td>
                <td width="80">促销类型</td>
                <td width="80">操作</td>
            </tr>
            </thead>
            <tbody id="pro">
            <tr  class="ui_td">
                <td id="td1"></td>
                <td id="td2"></td>
                <td id="td9"></td>
                <td id="td3"></td>
                <td id="td4"></td>
                <td id="td5"></td>
                <td id="td6"></td>
                <td id="td7"></td>
                <td id="td8" style="color: red;" align="center" id="deletepro" onclick="deletepro(this)">
                    删除
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</form>